﻿using System.Collections.Generic;
using FluentNHibernate.Mapping;

namespace Model
{
	public class Guild
	{
		public virtual int ID { get; set; }
		public virtual string Name { get; set; }
		public virtual Faction Faction { get; set; }
		public virtual int Level { get; set; }
		public virtual Realm Realm { get; set; }
        private IList<AchievementProgress> _achievementProgress = new List<AchievementProgress>();
        public virtual IList<AchievementProgress> AchievementProgress { get { return _achievementProgress; } set { _achievementProgress = value; } }
	}

	public class GuildMapping : ClassMap<Guild>
	{
		public GuildMapping()
		{
			Id(x => x.ID);
			Map(x => x.Name);
			Map(x => x.Faction);
			Map(x => x.Level);
			References(x => x.Realm);
		    HasMany(x => x.AchievementProgress);
		}
	}
}
